package club.twelveblog.tblog.common.enums;

import lombok.*;

/**
 * 通用异常处理
 */
@Getter
@AllArgsConstructor
@NoArgsConstructor
public enum ExceptionEnum {
    UPLOADIMAGE_ERROR(500,"照片上传失败"),
    TOKEN_NOT_FOUND(500,"token不存在"),
    USERS_NOT_FOUND(404,"用户查找失败"),
    INVALID_FILE_TYPE(500,"文件类型不匹配"),
    ADMIN_NOT_FOUND(404,"无法查找指定管理员"),
    BAD_PARAM_REQUEST(400,"请求参数不匹配"),
    USER_NOT_FOUND(404,"用户不存在"),
    UPDATE_FAILED(500,"信息更新失败"),
    ADD_FAILED(500,"添加失败"),
    ERROR_QUERY_BLOGINFO(404,"用户文章查找为空"),
    CATEGORY_NOT_FOUND(404,"分类查找为空"),
    COMMENT_FAILED(500,"评论失败"),
    LOGIN_PASSWORD_FAILED(500,"用户名或密码错误"),
    REGISTER_FAILED(500,"用户名已经存在")
    ;
    //返回前端页面的状态码
    private int code;
    //返回前端页面的信息
    private String msg;
}
